package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import vista.VistaMenu;


public class ControladorMenu implements ActionListener {
	private VistaMenu vista;
	
	
	public static void main(String[] args) {
		new ControladorMenu();
	}
	
	public ControladorMenu() {
		this.vista = new VistaMenu();
		this.vista.addlistener(this);
		this.vista.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent evt) {
		System.out.println(evt.getActionCommand());
		if(evt.getActionCommand().equals("Ingrediente")){
			new ControladorIngredientes();
		}
		else if(evt.getActionCommand().equals("Producto")){
			new ControladorProducto();
		}
		else if(evt.getActionCommand().equals("Categoria")){
			new ControladorCategorias();
		}
		else if(evt.getActionCommand().equals("Orden")){
			new ControladorOrden();
		}
		else if(evt.getActionCommand().equals("Ver")){
			new ControladorListados();
		}
	}//end actionPerformed
}
